import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useUserStore = defineStore(
  'user',
  () => {
    const token = ref('')

    function setToken(val) {
      token.value = val
    }
    return { token, setToken }
  },
  {
    persist: true //持久化
  }
)
